package cn.edu.zjut.mina.xcmahjong;

import cn.edu.zjut.mina.interf.ICardBean;

public class XcmjCardBean implements ICardBean {
	

	private String name="";// 牌名
	private Integer number;
	private Character type;
	private Integer index;
	private Integer owner;
	private String userId;
	private int typeInt;
	public int getIndex() {
		return index;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserId() {
		return userId;
	}

	public void setTypeInt(int typeInt) {
		this.typeInt = typeInt;
	}

	public int getTypeInt() {
		return typeInt;
	}

	public void setOwner(int owner) {
		this.owner = owner;
	}

	public int getOwner() {
		return owner;
	}

	public void setName() {
		name="";
		if (typeInt != 4) {
			switch (number) {
			case 1:
				name += "一";
				break;
			case 2:
				name += "二";
				break;
			case 3:
				name += "三";
				break;
			case 4:
				name += "四";
				break;
			case 5:
				name += "五";
				break;
			case 6:
				name += "六";
				break;
			case 7:
				name += "七";
				break;
			case 8:
				name += "八";
				break;
			case 9:
				name += "九";
				break;
			}
			
			switch (typeInt) {
			case 1:
				name += "万";
				break;
			case 2:
				name += "筒";
				break;
			case 3:
				name += "条";
				break;
			}
		}
		else
		{
			switch(number){
			case 1:
				name="东风";
				break;
			case 3:
				name="南风";
				break;
			case 5:
				name="西风";
				break;
			case 7:
				name="北风";
				break;
			case 9:
				name="红中";
				break;
			case 11:
				name="發财";
				break;
			case 13:
				name="白板";
				break;
				
			}
		}
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public void setType(char type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public int getNumber() {
		return number;
	}

	public char getType() {
		return type;
	}

	public void setIndex(int index) {
		// TODO Auto-generated method stub
		this.index=index;
	}
	
	@Override
	public String toString() {
		return "XcmjCardBean [name=" + name + ", number=" + number + ", type=" + type + ", index=" + index + ", owner="
				+ owner + ", userId=" + userId + ", typeInt=" + typeInt + "]";
	}

	
}
